package cn.wizzer.app.task.commons.ext.quartz.job;

import cn.wizzer.app.user.modules.services.GroupLogService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.log.Log;
import org.nutz.log.Logs;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;


@IocBean
public class DelGroupLogJob implements Job {

    private static final Log log = Logs.get();
    @Inject
    @Reference
    private GroupLogService groupLogService;


    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        log.info("定时删除一段时间前的群聊记录开始");
        groupLogService.delLogJob();
        log.info("定时删除一段时间前的群聊记录结束");
    }
}
